/**
 * @Auto generation code
 * Index Controller
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, loading
 * 当前城市是否提供服务 - GET
 */
export const getAvailableCitys = async (loading) => {
	return await request.get('/city/available', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 通过经纬度获取具体地址信息 - GET
 */
export const locationToCity = async ({// query params
		longitude ,   // 经度  
		latitude   // 纬度  
	
}, loading) => {
	return await request.get('/city/location', {
		 longitude,  latitude, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * checkOpenId - GET
 */
export const checkOpenId = async ({// query params
		redirect   // redirect  
	
}, loading) => {
	return await request.get('/wechat/check_openid', {
		 redirect, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 分销商登陆接口 - GET
 */
export const disWechatLogin = async ({// query params
		code ,   // 微信code  
		state   // 状态参数  
	
}, loading) => {
	return await request.get('/wechat/distributor/login', {
		 code,  state, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * customFeedbackLogin - GET
 */
export const customFeedbackLogin = async ({// query params
		code   // code  
	
}, loading) => {
	return await request.get('/wechat/feedback', {
		 code, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 绿地用户登陆 - GET
 */
export const greenlandWechatLogin = async ({// query params
		code ,   // 绿地编码，标志绿地用户  
		redirect ,   // 重定向地址，跳转到指定URL  
		customId   // 用户ID  
	
}, loading) => {
	return await request.get('/wechat/greenland/login', {
		 code,  redirect,  customId, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * 微信网页跳转登陆 - GET
 */
export const customWechatLogin = async ({// query params
		code ,   // 微信code  
		state ,   // 参数  
		redirect   // 重定向地址  
	
}, loading) => {
	return await request.get('/wechat/login', {
		 code,  state,  redirect, 
	}, loading)
}


/**
 * 
 * path, params, loading
 * customMyselfLogin - GET
 */
export const customMyselfLogin = async ({// query params
		code   // code  
	
}, loading) => {
	return await request.get('/wechat/myself', {
		 code, 
	}, loading)
}

